<template>
	<view>
	<block v-if="!alreadyLogin">
	<!-- 用户登录 -->
		<uni-transition mode-class="slide-left" :show="isLoginShow">
			<xz-login @userloginsuccess='alreadyLogin=true' @gotoregister='isLoginShow=false'></xz-login>
		</uni-transition>
	
		<!-- 用户注册 -->
	
		<uni-transition mode-class="slide-right" :show="!isLoginShow">
			<xz-register @gologin='isLoginShow=true'></xz-register>
		</uni-transition>
	</block>
	<!-- 登陆成功 显示用户档案 -->
	
	<xz-profile v-else></xz-profile>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				isLoginShow:true,
				alreadyLogin:false  //当前用户是否已登录
			};
		}
	}
</script>

<style lang="scss">

</style>
